package com.eshipenet.shipnet.edgeboxextbuilder

import play.api.libs.json.{Format, JsObject, JsValue, Json}

object EdgeBox {

  implicit val format: Format[EdgeBox] = Json.format[EdgeBox]

  def apply(data: JsObject): EdgeBox = {
    val id      = (data \ "id").as[String]
    val modelId = (data \ "modelId").as[String]
    new EdgeBox(id, modelId, data)
  }

}

case class EdgeBox(id: String, modelId: String, data: JsObject)
